/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.mrp.ppm.session;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import javax.ejb.Local;
import merlion.mrp.ppm.entity.BOM;
import merlion.mrp.ppm.entity.MRP;

/**
 *
 * @author Zhang Ying
 */
@Local
public interface MRPSessionLocal {

    public boolean checkAbleToCreateMRP(int month, Integer selectedYear);

    public BOM getBOM(String materialName);

    public boolean persistNewMrps(ArrayList<MRP> newMRPs, Long staffId);

    public MRP getMRPById(Long id);

    public ArrayList<ArrayList<Long>> getWeeklyDemands(Integer startPeriodYear, Integer startPeriodMonth);

    public Long getPlannedInventoryForPrevWeek(Integer startPeriodYear, Integer startPeriodMonth, BOM bom);

    public Collection<MRP> getAllMRPs();

    public boolean updateMRP(MRP selectedMRP);
    
    public MRP getMRPByDateAndMaterial(Integer selectedYear, Integer selectedMonth, String materialName);

    public Long getRawMaterialSafetyStockFromSCM(String name);
    
    public ArrayList<Long> getMRPPurchasePlan (Date date);

}
